package com.miniserver.tql.database;

import java.sql.Connection;

/**
 * 
 * @author
 * 
 */
public interface EngineContext {
	String get(String attrName);

	String get(String attrName, String defaultAttrValue);

	void put(String attrName, String attrValue);

	boolean contains(String attrName);

	EngineFunction getFunction();

	boolean hasTransaction();

	void setHasTransaction(boolean hasTrans);

	Connection getConnection();

	void setConnection(Connection conn);

	Connection[] getMemdbConns();

	void setMemdbConns(Connection[] conns);

	void destroy();

	/**
	 * 获取正在执行的Model文件中的配置信息
	 */
	ModelConfiguration getModelConfig();

	void popState();

	void pushState(int mode, int require)  throws Exception;

	boolean isMemdbMode();
}
